<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
    <title>ng-model在表单中双向绑定实例</title>
    <style>
        .ng-cloak{
            display: none;
        }
    </style>
</head>
<body>
<div ng-app="tinywan" ng-controller="ctrl">
    <form action="{:U('AngularJS/ng_model_form')}" method="get">
        <input type="text" name="title" ng-model="name">
        <input type="submit" value="Commit">
    </form>
    <h1>{{name}}</h1>
</div>

<script>
    var module = angular.module('tinywan', []);
    module.controller('ctrl', ['$scope', function ($scope) {
        $scope.name = 'angular study';
    }]);
</script>
</body>
</html>


